const { readFileSync } = require('fs')
const http = require('http')

http.createServer((req, res) => {
    // console.log(req.url)
    // res.end('welcome to node')
    if (req.url === '/index') {
        const content = readFileSync('./index.html', {encoding:'utf8'})

        res.end(content);
    }
}).listen(3000)